package com.testmanager.testmananger.zyyc.interTest.domain;

import com.testmanager.testmananger.foundation.domain.AbstractAuditingEntity;
import com.testmanager.testmananger.zyyc.interTest.constant.CaseTestResultType;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

@Entity
@Data
@Accessors(chain = true)
@Table(name = "yc_case_result")
public class CaseTestResultEntity extends AbstractAuditingEntity implements Serializable {
    private static final long serialVersionUID = 4164654011994959680L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    @Column
    private long no;
    @Column(name = "case_no")
    private long caseNo;
    @Column(name = "suite_no")
    private long suiteNo;
    @Column(name = "case_name")
    private String caseName;

//    @Column(name = "output")
//    private String output;

    @Column(name = "parameters")
    private String parameters;
    @Column
    @Convert(converter = TestResultTypesConvert.class)
    private CaseTestResultType status;  // 成功 失败  未执行  int SUCCESS = 1;  FAILURE = 2; SKIP = 3; SUCCESS_PERCENTAGE_FAILURE = 4;
    @Column(name = "start_time")
    private LocalDateTime startTime;
    @Column(name = "end_time")
    private LocalDateTime endTime;


}
